﻿<%@ Page Title="Tra cứu tài xế" MasterPageFile="~/Admin/Site.Master" Language="C#"
    AutoEventWireup="true" CodeBehind="TraCuuTaiXe.aspx.cs" Inherits="Transport.Admin.TraCuuTaiXe" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript">
                $("#MainContent_btn_Search").validate({
                    errorElement: "span", //Thành phần HTML hiện thông báo lỗi
                });
            });
    </script>
    <script type="text/javascript">
        $(function () {
            var txt_Begin = $("#MainContent_txt_Begin").datepicker({ dateFormat: 'dd/mm/yy', changeYear: true, changeMonth: true, yearRange: "-70:+0" });
            var txt_Begin = $("#MainContent_txt_End").datepicker({ dateFormat: 'dd/mm/yy', changeYear: true, changeMonth: true, yearRange: "-70:+0" });
        }); 
    </script>
    <p>
        <b>Ngày bắt đầu:</b>
        <asp:TextBox ID="txt_Begin" runat="server"></asp:TextBox>
        <b>Ngày kết thúc:</b>
        <asp:TextBox ID="txt_End" runat="server"></asp:TextBox>
        <asp:Button ID="btn_Search" runat="server" Text="Tìm" />
    </p>
    <p>
        <b>Tình trạng</b>
        <asp:DropDownList ID="ddl_Status" runat="server" AutoPostBack="True" DataSourceID="EntityDataSource_Status"
            DataTextField="ten_tinh_trang" DataValueField="ma_tinh_trang" AppendDataBoundItems="true">
            <asp:ListItem Text="Select All" Value="-1" />
        </asp:DropDownList>
        <asp:EntityDataSource ID="EntityDataSource_Status" runat="server" ConnectionString="name=transportEntities"
            DefaultContainerName="transportEntities" EnableFlattening="False" EntitySetName="tinh_trang_tai_xe"
            EntityTypeFilter="tinh_trang_tai_xe">
        </asp:EntityDataSource>
    </p>
    <div>
        <asp:GridView ID="GridView_Driver" runat="server" AutoGenerateColumns="False"
            CellPadding="4" DataKeyNames="ma_tai_xe" CellSpacing="4" ForeColor="#333333"
            GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="ma_tai_xe" HeaderText="Mã tài xế" ReadOnly="True" SortExpression="ma_tai_xe" />
                <asp:BoundField DataField="ten" HeaderText="Họ tên" SortExpression="ten" />
                <asp:BoundField DataField="nam_sinh" HeaderText="Năm sinh" DataFormatString="{0:d}"
                    ApplyFormatInEditMode="true" SortExpression="nam_sinh" />
                <asp:BoundField DataField="cmnd" HeaderText="Số CMND" SortExpression="cmnd" />
                <asp:BoundField DataField="dien_thoai" HeaderText="Điện thoại" SortExpression="dien_thoai" />
                <asp:BoundField DataField="dia_chi" HeaderText="Địa chỉ" SortExpression="dia_chi" />
                <asp:TemplateField HeaderText="Tình trạng">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddl_uStatus" runat="server" DataSourceID="EntityDataSource_Status"
                            DataTextField="ten_tinh_trang" DataValueField="ma_tinh_trang" SelectedValue='<%# Bind("tinh_trang") %>'>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="so_chuyen" HeaderText="Số chuyến" SortExpression="so_chuyen" />
            </Columns>
            <FooterStyle BackColor="#7FB308" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#7FB308" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <SortedAscendingCellStyle BackColor="#FDF5AC" />
            <SortedAscendingHeaderStyle BackColor="#4D0000" />
            <SortedDescendingCellStyle BackColor="#FCF6C0" />
            <SortedDescendingHeaderStyle BackColor="#820000" />
        </asp:GridView>
    </div>
</asp:Content>
